import './scss/index.scss'
import 'font-awesome/scss/font-awesome.scss'

function install(app) {
    register(app, require.context('./components', true, /\.vue$/))
}

function register(app, requireComponent) {
    requireComponent.keys().forEach((fileName) => {
        const componentConfig = requireComponent(fileName)
        const componentName = fileName.replace(/\.vue$/, '').split('/').reverse()[0]

        app.component(componentName, componentConfig.default)
    })
}

export default {
    install
}